{% extends 'website/frontend/frontend_base.html' %}
{% load static %}
{% block title %}{% endblock %}
{% block extarnal_header %}
    <script type="text/javascript" src="{% static 'syntaxhighlighter/shCore.js' %}"></script>
    <script type="text/javascript" src="{% static 'syntaxhighlighter/shBrushBash.js' %}"></script>
    <script type="text/javascript" src="{% static 'syntaxhighlighter/shBrushCpp.js' %}"></script>
    <script type="text/javascript" src="{% static 'syntaxhighlighter/shBrushCss.js' %}"></script>
    <script type="text/javascript" src="{% static 'syntaxhighlighter/shBrushJava.js' %}"></script>
    <script type="text/javascript" src="{% static 'syntaxhighlighter/shBrushJScript.js' %}"></script>
    <script type="text/javascript" src="{% static 'syntaxhighlighter/shBrushPython.js' %}"></script>
    <script type="text/javascript" src="{% static 'syntaxhighlighter/shBrushPlain.js' %}"></script>
    <script type="text/javascript" src="{% static 'syntaxhighlighter/shBrushSql.js' %}"></script>
    <script type="text/javascript" src="{% static 'syntaxhighlighter/shBrushXml.js' %}"></script>
    <link rel="stylesheet" href="{% static 'syntaxhighlighter/shCoreMidnight.css' %}">
    <link rel="stylesheet" href="{% static 'syntaxhighlighter/shThemeMidnight.css' %}">
{% endblock %}

{% block left %}
    <div class="col-md-12 article">
        <div class="col-md-12">
            <h2><a href="#">{{ article.title }}</a></h2>
            <p>
                <small>
                    <span class="glyphicon glyphicon-calendar" aria-hidden="true"></span>
                    {{ article.publish_time|date:'Y-m-d' }}&nbsp;{{ article.publish_time|time:'H:i' }}
                </small>
            </p>
            <blockquote>
                <p class="text-danger">原创文章，转载请注明出处和作者</p>
            </blockquote>
        </div>
        <div class="col-md-12">
            {{ article.content|safe }}
        </div>
        <div class="col-md-6">
            <span class="label label-default">
                <span class="text-left">
                    <span class="glyphicon glyphicon-tags" aria-hidden="true"></span>
                    &emsp;{{ article.category }}
                </span>
            </span>
        </div>
        <div class="col-md-6 text-right">
            <a role="button" class="btn btn-info btn-xs" href="{% url 'homepage' %}">
                <span class="glyphicon glyphicon-console" aria-hidden="true"></span>
                &emsp;返回首页
            </a>
        </div>
    </div>
{% endblock %}

{% block front_js %}
    <script type="text/javascript">
        SyntaxHighlighter.all()
    </script>
{% endblock %}